<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use App\Model\AdminFeedback;

class AdminFeedbacks extends Controller
{
	//显示意见反馈列表
    public function BackList()
    {
    	$back = AdminFeedback::select('id', 'username', 'msg', 'updated_at', 'type')->get();

    	return view('Admin.feedback.backs-list', ['back' => $back]);

    }

    //删除意见反馈
    public function BackDel($id)
    {
    	$res = AdminFeedback::where('id', $id)->delete();

    	if ($res) {

    		 return back()->with('message', '删除成功');
    	
    	}

    	 return back()->with('message', '删除失败');
    }
}
